import './assets/main.css'

import { createApp } from 'vue'
import { createPinia } from 'pinia'
import persist from 'pinia-plugin-persistedstate' //导入持久化插件
import * as Elicons from '@element-plus/icons-vue';
//引入Elmessage和Elloading的css样式文件
import 'element-plus/theme-chalk/el-loading.css';
import 'element-plus/theme-chalk/el-message.css';
import 'element-plus/theme-chalk/el-message-box.css';
//ElCard, ElDialog
import 'element-plus/theme-chalk/el-card.css';
import 'element-plus/theme-chalk/el-dialog.css';
// icon
import * as ElementPlusIconsVue from '@element-plus/icons-vue'





import App from './App.vue'
import router from './router'

const app = createApp(App)
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component)
}
//全局注册elementplus icon

app.use(createPinia().use(persist))
app.use(router)

app.mount('#app')
